Subject: Conversation characteristics incompatibilities

From: "Jack Sanders (8-444-4459)" <[email-masked]>
Date: Mon, 9 Aug 93 12:23:21 EDT

The current definition of CPI-C 1.2 allows a program to set some
conversation characteristics in Initialize_Incoming state while others
are set later by CPI-C based on the values received in the conversation
startup request.  This allows incompatibilities to arise.  Such
incompatibilities are prevented by CPI-C on the initiating side and after
the conversation has been accepted on the recipient side.

For example, a program in Initialize-Incoming state may set send_type to
CM_SEND_AND_CONFIRM and CPI-C, based on the value in the conversation
startup request, may set sync_level to CM_NONE.  When the program gets
send control and issues Send_Data, what happens?  The sync-level does not
allow confirmation to be used, but the program may expect a CM_OK
return code to mean the partner program has confirmed the data.

The following is the list of incompatibilities that must be addressed:

 For sync_level set to CM_NONE
   send_type set to CM_SEND_AND_CONFIRM
   prepare_to_receive_type set to CM_PREPARE_TO_RECEIVE_CONFIRM
   deallocate_type set to CM_DEALLOCATE_CONFIRM

 For sync_level set to CM_SYNC_POINT
   deallocate_type set to CM_DEALLOCATE_FLUSH
   deallocate_type set to CM_DEALLOCATE_CONFIRM

In addition, a program may issue Set_Fill or Set_Log_Data in
Initialize-Incoming state, and the conversation startup request may be
for a mapped conversation.  CPI-C does not allow a program to issue
Set_Fill or Set_Log_Data if the conversation is mapped.  These
incompatibilities appear less problematic because it is explicitly stated
that the fill and log_data characteristics are ignored for mapped
conversations.

Here are two alternatives.

Alternative 1:
--------------

Do not allow a program to set send_type, prepare_to_receive_type , or
deallocate_type in Initialize_Incoming state.  CM_PROGRAM_STATE_CHECK
would be returned to those calls if issued in Initialize_Incoming state.
Additional disallowed Set calls would be defined for CPIC 2.0.  The only
limitation is that a program could not issue Deallocate(Abend) in
Initalize_Incoming state.  It could howver, issue Cancel_Conversation,
which has the same effect.

Alternative 2:
--------------
Allow a program to issue the calls in
Initialize_Incoming state, but return CM_PROGRAM_PARAMETER_CHECK if
the specified value is disallowed.  Specifically, the disallowed values
would be:
   send_type set to CM_SEND_AND_CONFIRM
   prepare_to_receive_type set to CM_PREPARE_TO_RECEIVE_CONFIRM
   deallocate_type set to CM_DEALLOCATE_FLUSH
   deallocate_type set to CM_DEALLOCATE_CONFIRM

Either alternative would be extended to CPI-C 2.0 as applicable.

Comments?

Jack